
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>索引结构 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="indexValid.html" />
    
    
    <link rel="prev" href="mysqlIndex.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="mysqlTx.html">
            
                <a href="mysqlTx.html">
            
                    
                    mysql innoDB事务级别
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="level.html">
            
                <a href="level.html">
            
                    
                    mysql 事务级别
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="mvvc.html">
            
                <a href="mvvc.html">
            
                    
                    mysql 多版本控制
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="mysqlIndex.html">
            
                <a href="mysqlIndex.html">
            
                    
                    mysql 索引
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.3.1" data-path="bplusTree.html">
            
                <a href="bplusTree.html">
            
                    
                    索引结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="indexValid.html">
            
                <a href="indexValid.html">
            
                    
                    索引失效
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="indexRule.html">
            
                <a href="indexRule.html">
            
                    
                    索引规范
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >索引结构</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x7D22;&#x5F15;&#x7ED3;&#x6784;">&#x7D22;&#x5F15;&#x7ED3;&#x6784;</h1>
<h3 id="1-b-tree">1. B tree</h3>
<p><img src="images/btree.png" alt="btree"></p>
<h3 id="2-btree">2. B+tree</h3>
<p><img src="images/b+tree.png" alt="B+Tree"></p>
<h3 id="3-btree&#x76F8;&#x5BF9;&#x4E8E;b-tree&#x6709;&#x51E0;&#x70B9;&#x4E0D;&#x540C;&#xFF1A;">3. B+Tree&#x76F8;&#x5BF9;&#x4E8E;B-Tree&#x6709;&#x51E0;&#x70B9;&#x4E0D;&#x540C;&#xFF1A;</h3>
<ul>
<li><p>&#x975E;&#x53F6;&#x5B50;&#x8282;&#x70B9;&#x53EA;&#x5B58;&#x50A8;&#x952E;&#x503C;&#x4FE1;&#x606F;&#x3002;</p>
</li>
<li><p>&#x6240;&#x6709;&#x53F6;&#x5B50;&#x8282;&#x70B9;&#x4E4B;&#x95F4;&#x90FD;&#x6709;&#x4E00;&#x4E2A;&#x94FE;&#x6307;&#x9488;&#x3002;</p>
</li>
<li><p>&#x6570;&#x636E;&#x8BB0;&#x5F55;&#x90FD;&#x5B58;&#x653E;&#x5728;&#x53F6;&#x5B50;&#x8282;&#x70B9;&#x4E2D;&#x3002;</p>
</li>
</ul>
<h3 id="4-myisam&#x7D22;&#x5F15;&#x5B9E;&#x73B0;">4. MyISAM&#x7D22;&#x5F15;&#x5B9E;&#x73B0;</h3>
<p>MyISAM&#x5F15;&#x64CE;&#x4F7F;&#x7528;B+Tree&#x4F5C;&#x4E3A;&#x7D22;&#x5F15;&#x7ED3;&#x6784;&#xFF0C;&#x53F6;&#x7ED3;&#x70B9;&#x7684;data&#x57DF;&#x5B58;&#x653E;&#x7684;&#x662F;&#x6570;&#x636E;&#x8BB0;&#x5F55;&#x7684;&#x5730;&#x5740;&#x3002;&#x4E0B;&#x9762;&#x662F;MyISAM&#x7D22;&#x5F15;&#x7684;&#x539F;&#x7406;&#x56FE;&#xFF1A;</p>
<p><img src="images/mysi.png" alt="img"></p>
<p>&#x8FD9;&#x91CC;&#x8BBE;&#x8868;&#x4E00;&#x5171;&#x6709;&#x4E09;&#x5217;&#xFF0C;&#x5047;&#x8BBE;&#x6211;&#x4EEC;&#x4EE5;Col1&#x4E3A;&#x4E3B;&#x952E;&#xFF0C;&#x5219;&#x56FE;8&#x662F;&#x4E00;&#x4E2A;MyISAM&#x8868;&#x7684;&#x4E3B;&#x7D22;&#x5F15;&#xFF08;Primary key&#xFF09;&#x793A;&#x610F;&#x3002;&#x53EF;&#x4EE5;&#x770B;&#x51FA;MyISAM&#x7684;&#x7D22;&#x5F15;&#x6587;&#x4EF6;&#x4EC5;&#x4EC5;&#x4FDD;&#x5B58;&#x6570;&#x636E;&#x8BB0;&#x5F55;&#x7684;&#x5730;&#x5740;&#x3002;&#x5728;MyISAM&#x4E2D;&#xFF0C;&#x4E3B;&#x7D22;&#x5F15;&#x548C;&#x8F85;&#x52A9;&#x7D22;&#x5F15;&#xFF08;Secondary key&#xFF09;&#x5728;&#x7ED3;&#x6784;&#x4E0A;&#x6CA1;&#x6709;&#x4EFB;&#x4F55;&#x533A;&#x522B;&#xFF0C;&#x53EA;&#x662F;&#x4E3B;&#x7D22;&#x5F15;&#x8981;&#x6C42;key&#x662F;&#x552F;&#x4E00;&#x7684;&#xFF0C;&#x800C;&#x8F85;&#x52A9;&#x7D22;&#x5F15;&#x7684;key&#x53EF;&#x4EE5;&#x91CD;&#x590D;&#x3002;&#x5982;&#x679C;&#x6211;&#x4EEC;&#x5728;Col2&#x4E0A;&#x5EFA;&#x7ACB;&#x4E00;&#x4E2A;&#x8F85;&#x52A9;&#x7D22;&#x5F15;&#xFF0C;&#x5219;&#x6B64;&#x7D22;&#x5F15;&#x7684;&#x7ED3;&#x6784;&#x5982;&#x4E0B;&#x56FE;&#x6240;&#x793A;&#xFF1A;</p>
<p><img src="images/mysi2.png" alt="img"></p>
<h3 id="5-innodb-&#x7D22;&#x5F15;&#x7ED3;&#x6784;">5. innoDB &#x7D22;&#x5F15;&#x7ED3;&#x6784;</h3>
<p>InnoDB&#x4E5F;&#x4F7F;&#x7528;B+Tree&#x4F5C;&#x4E3A;&#x7D22;&#x5F15;&#x7ED3;&#x6784;&#xFF0C;&#x4F46;&#x5177;&#x4F53;&#x5B9E;&#x73B0;&#x65B9;&#x5F0F;&#x5374;&#x4E0E;MyISAM&#x622A;&#x7136;&#x4E0D;&#x540C;&#x3002;</p>
<p>&#x7B2C;&#x4E00;&#x4E2A;&#x91CD;&#x5927;&#x533A;&#x522B;&#x662F;InnoDB&#x7684;&#x6570;&#x636E;&#x6587;&#x4EF6;&#x672C;&#x8EAB;&#x5C31;&#x662F;&#x7D22;&#x5F15;&#x6587;&#x4EF6;&#x3002;&#x4ECE;&#x4E0A;&#x6587;&#x77E5;&#x9053;&#xFF0C;MyISAM&#x7D22;&#x5F15;&#x6587;&#x4EF6;&#x548C;&#x6570;&#x636E;&#x6587;&#x4EF6;&#x662F;&#x5206;&#x79BB;&#x7684;&#xFF0C;&#x7D22;&#x5F15;&#x6587;&#x4EF6;&#x4EC5;&#x4FDD;&#x5B58;&#x6570;&#x636E;&#x8BB0;&#x5F55;&#x7684;&#x5730;&#x5740;&#x3002;&#x800C;&#x5728;InnoDB&#x4E2D;&#xFF0C;&#x8868;&#x6570;&#x636E;&#x6587;&#x4EF6;&#x672C;&#x8EAB;&#x5C31;&#x662F;&#x6309;B+Tree&#x7EC4;&#x7EC7;&#x7684;&#x4E00;&#x4E2A;&#x7D22;&#x5F15;&#x7ED3;&#x6784;&#xFF0C;&#x8FD9;&#x68F5;&#x6811;&#x7684;&#x53F6;&#x7ED3;&#x70B9;data&#x57DF;&#x4FDD;&#x5B58;&#x4E86;&#x5B8C;&#x6574;&#x7684;&#x6570;&#x636E;&#x8BB0;&#x5F55;&#x3002;&#x8FD9;&#x4E2A;&#x7D22;&#x5F15;&#x7684;key&#x662F;&#x6570;&#x636E;&#x8868;&#x7684;&#x4E3B;&#x952E;&#xFF0C;&#x56E0;&#x6B64;InnoDB&#x8868;&#x6570;&#x636E;&#x6587;&#x4EF6;&#x672C;&#x8EAB;&#x5C31;&#x662F;&#x4E3B;&#x7D22;&#x5F15;&#x3002;</p>
<p><img src="images/innodb.png" alt="img"></p>
<p>InnoDB&#x4E3B;&#x7D22;&#x5F15;&#xFF08;&#x540C;&#x65F6;&#x4E5F;&#x662F;&#x6570;&#x636E;&#x6587;&#x4EF6;&#xFF09;&#x7684;&#x793A;&#x610F;&#x56FE;&#xFF0C;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x53F6;&#x7ED3;&#x70B9;&#x5305;&#x542B;&#x4E86;&#x5B8C;&#x6574;&#x7684;&#x6570;&#x636E;&#x8BB0;&#x5F55;&#x3002;&#x8FD9;&#x79CD;&#x7D22;&#x5F15;&#x53EB;&#x505A;&#x805A;&#x96C6;&#x7D22;&#x5F15;&#x3002;&#x56E0;&#x4E3A;InnoDB&#x7684;&#x6570;&#x636E;&#x6587;&#x4EF6;&#x672C;&#x8EAB;&#x8981;&#x6309;&#x4E3B;&#x952E;&#x805A;&#x96C6;&#xFF0C;&#x6240;&#x4EE5;InnoDB&#x8981;&#x6C42;&#x8868;&#x5FC5;&#x987B;&#x6709;&#x4E3B;&#x952E;&#xFF08;MyISAM&#x53EF;&#x4EE5;&#x6CA1;&#x6709;&#xFF09;&#xFF0C;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x663E;&#x5F0F;&#x6307;&#x5B9A;&#xFF0C;&#x5219;MySQL&#x7CFB;&#x7EDF;&#x4F1A;&#x81EA;&#x52A8;&#x9009;&#x62E9;&#x4E00;&#x4E2A;&#x53EF;&#x4EE5;&#x552F;&#x4E00;&#x6807;&#x8BC6;&#x6570;&#x636E;&#x8BB0;&#x5F55;&#x7684;&#x5217;&#x4F5C;&#x4E3A;&#x4E3B;&#x952E;&#xFF0C;&#x5982;&#x679C;&#x4E0D;&#x5B58;&#x5728;&#x8FD9;&#x79CD;&#x5217;&#xFF0C;&#x5219;MySQL&#x81EA;&#x52A8;&#x4E3A;InnoDB&#x8868;&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x9690;&#x542B;&#x5B57;&#x6BB5;&#x4F5C;&#x4E3A;&#x4E3B;&#x952E;&#xFF0C;&#x8FD9;&#x4E2A;&#x5B57;&#x6BB5;&#x957F;&#x5EA6;&#x4E3A;6&#x4E2A;&#x5B57;&#x8282;&#xFF0C;&#x7C7B;&#x578B;&#x4E3A;&#x957F;&#x6574;&#x5F62;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="mysqlIndex.html" class="navigation navigation-prev " aria-label="Previous page: mysql 索引">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="indexValid.html" class="navigation navigation-next " aria-label="Next page: 索引失效">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"索引结构","level":"1.3.1","depth":2,"next":{"title":"索引失效","level":"1.3.2","depth":2,"path":"indexValid.md","ref":"indexValid.md","articles":[]},"previous":{"title":"mysql 索引","level":"1.3","depth":1,"path":"mysqlIndex.md","ref":"mysqlIndex.md","articles":[{"title":"索引结构","level":"1.3.1","depth":2,"path":"bplusTree.md","ref":"bplusTree.md","articles":[]},{"title":"索引失效","level":"1.3.2","depth":2,"path":"indexValid.md","ref":"indexValid.md","articles":[]},{"title":"索引规范","level":"1.3.3","depth":2,"path":"indexRule.md","ref":"indexRule.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"bplusTree.md","mtime":"2020-12-20T03:08:51.690Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-12-20T03:10:47.989Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

